struct ListNode *createlist()
{
    struct ListNode* head = NULL;
    while(1)
    {
        int number = 0;
        scanf("%d", &number);
        if(number == -1) break;

        struct ListNode* newnode = (struct ListNode*)malloc(sizeof(struct ListNode));
        newnode->data = number;
        newnode->next = NULL;
        
        if(head == NULL)
        {
            head = newnode;
        }
        else
        {
            //find tail
            struct ListNode*cur = head;
            while(cur->next != NULL)
            {
                cur = cur->next;
            }
            cur->next = newnode;
        }
    }
    
    return head;
}
struct ListNode *deleteeven( struct ListNode *head )
{
    if(head == NULL)
    {
        return head;
    }

    while(head != NULL && (head->data % 2 == 0))
    {
        struct ListNode* del = head;
        head = head->next;
        free(del);
        del = NULL;
    }
    
    struct ListNode* cur = head;
    while(cur != NULL && cur->next != NULL)
    {
        if((cur->next->data) % 2 == 0)
        {
            struct ListNode* del = cur->next;
            cur->next = del->next;
            free(del);
            del = NULL;
        }
        else
        {
            cur = cur->next;
        } 
    }

    return head;
}